package com.da.web.assign_bed.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.da.cache.MyCache;
import com.da.web.assign_bed.entity.*;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author da
 * @time 2023/12/12 上午 11:02
 */
@CacheNamespace(implementation = MyCache.class, eviction = MyCache.class)
public interface AssignBedMapper extends BaseMapper<AssignBed> {
    //根据班级id查询分配的宿舍
    List<RoomVo> getRoomVoList(@Param("classId") Long classId);

    //根据宿舍id查询床位
    List<BedVo> getBedVoList(@Param("roomId") Long roomId);

    //根据班级id查询分配的宿舍
    List<SelectRoom> getRoomByClassId(@Param("classId") Long classId);

    //查询床位
    List<SelectBed> getBedByClassId(@Param("classId") Long classId, @Param("roomId") Long roomId);


}
